package cn.donting.myapplication_java;

import com.jme3.app.Application;
import com.jme3.app.SimpleApplication;
import com.jme3.app.StatsAppState;
import com.jme3.app.state.AbstractAppState;
import com.jme3.app.state.AppStateManager;
import com.jme3.material.Material;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.shape.Box;

public class JmeApp extends SimpleApplication {
    public JmeApp() {
        super();
    }

    @Override
    public void simpleInitApp() {
        Geometry node = new Geometry();
        node.setMesh(new Box(1, 1, 1));
        node.setMaterial(new Material(assetManager,
                "Common/MatDefs/Misc/Unshaded.j3md"));
        rootNode.attachChild(node);
        System.out.println();
    }

    @Override
    public void simpleUpdate(float tpf) {
        try {
            super.simpleUpdate(tpf);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
